package day12;

import java.math.BigInteger;

/*
* BigInteger
* */
public class Demo6 {
    public static void main(String[] args) {
        //承载超过了long类型范围的整型数据
        BigInteger big1 = new BigInteger("12345678900987654321");

        BigInteger big2 = new BigInteger("9876543211234567890");

        //加法运算
        BigInteger addBig = big1.add(big2);

        System.out.println("加法运算:"+addBig);

        //减法运算
        BigInteger subBig = big1.subtract(big2);

        System.out.println("减法运算:"+subBig);

        //乘法运算
        BigInteger mulBig = big1.multiply(big2);

        System.out.println("乘法运算:"+mulBig);

        //除法运算
        BigInteger divBig = big1.divide(big2);

        System.out.println("除法运算:"+divBig);


    }
}
